package Bacterias;

import java.util.ArrayList;
import java.util.List;

import Enums.AnimationType;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.support.v4.view.MotionEventCompat;
import android.util.Log;
import android.view.MotionEvent;

import com.game.ThauanFramework.BitmapStorage;
import com.game.ThauanFramework.GameObject;
import com.game.ThauanFramework.Util;
import com.game.ThauanFramework.SoundManager;
import com.game.ThauanFramework.Sprite;
import com.game.ThauanFramework.SpriteAnimationData;
import com.thauanLopes.bacterium.GameSceneView;
import com.thauanLopes.bacterium.GameManages.ScoreManager;
import com.thauanLopes.smagasmaga.R;

public class SuperBacteria extends GameObject implements Bac{

	private final String TAG = "Bacteria NORMAL";

	protected List<GameObject> cemetery;
	protected List<Bac> bacterias;

	protected int ScoreValue = 1;

	protected float saturation = 1;
	protected boolean alive = true;

	protected int x;
	protected int y;

	protected double lifeCronometro;
	protected double lifeTime = 4;

	protected int shake_magnitude = 2;
	protected boolean is2Shake = false;
	protected double timeShaking = 1;

	protected Sprite sprite;
	protected Rect destRect;

	protected GameSceneView gameSceneView;

	protected Bitmap bitmap;

	public int getX() {
		return x;
	}

	public void setX(int x) {
		this.x = x;
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
	}

	public Rect getDestRect() {
		return this.destRect;
	}

	public void setShake(boolean is2Shake) {
		this.is2Shake = is2Shake;
	}

	protected Rect shakeRect(Rect rect, int magnitude) {
		Rect shake_destRect = null;
		int xShakeMag = -this.shake_magnitude
				+ Util.getRandom().nextInt(this.shake_magnitude * 2);
		int yShakeMag = -this.shake_magnitude
				+ Util.getRandom().nextInt(this.shake_magnitude * 2);

		shake_destRect = new Rect(rect.left + xShakeMag, rect.top + yShakeMag,
				rect.right + xShakeMag, rect.bottom + yShakeMag);

		return shake_destRect;
	}

	@Override
	public void Destroy() {
		this.bacterias.remove(this);
	}
	
	@Override
	public void SetPosition(int x, int y) {
		this.x = x;
		this.y = y;
		this.destRect.set(x, y, x + this.sprite.getSpriteWidth(), y
				+ this.sprite.getSpriteHeight());
	}

	@Override
	public void Update(double d) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void Draw(Canvas canvas) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void Die() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public boolean onTouch(MotionEvent event) {
		// TODO Auto-generated method stub
		return false;
	}
}
